1. Field of the Invention
The present invention relates to a compression technique, more specifically to code mutual conversion in different encoding methods.
2. Description of the Related Art
When performing communication or storage of a large amount of data including an image, the data may be compressed to reduce the amount of the data. This technique is hereinafter referred to as encoding.
Depending on each application, there are many encoding methods. With the same method, a parameter may be adjusted corresponding to an object. Typical examples of an encoding parameter include a quantizing coefficient and a Huffman code. Code compatibility may be deteriorated depending on the parameter.
In the case of an encoding method (hereinafter, referred to as JPEG) standardized by JPEG (Joint Photographic Experts Group), Huffman encoding and arithmetic encoding can be used for entropy encoding. The entropy encoding should be selected from the balance between compression ratio and process complexity, which may be one of the abovementioned encoding parameters. Typical compatibility does not exist in both.
Japanese Published Unexamined Patent Application No. Hei 9-93133 which is a related art to solve a similar problem to this will be described as a related art. The related art has the problems of, in moving image encoding, mutual conversion between MPEG and H0.261 and conversion of bit rate or frame rate in the same format. A code using frequency conversion is generally referred to as a changed code. Unless otherwise specified, a code which is converted to be matched with a predetermined object as described above is hereinafter referred to as a converted code.
FIG. 12 is a configuration example of a related art encoder. The terms are partially changed so as to be matched along the purpose of the description of the present invention, which is not related to their nature. In the drawing, the numeral 10 denotes a code input unit, the numeral 11 denotes a block extraction unit, the numeral 12 denotes a reverse quantizing unit, the numeral 13 denotes an inter-frame computation unit, the numeral 14 denotes a quantizing unit, the numeral 15 denotes a restructuring unit, the numeral 40 denotes a converted code output unit, the numeral 110 denotes input code data, the numeral 111 denotes quantized data, the numerals 112 and 113 denote converted data, the numeral 114 denotes re-quantized data, and the numeral 130 denotes converted code data.
The respective parts of FIG. 12 will be described. The image encoder of FIG. 12 is configured as follows. The image input unit 10 receives a code from outside, which then sends out the input code data 110 to the block extraction unit 11. The block extraction unit 11 extracts a block from the input code data 110, which then sends out the quantized data 111 to the reverse quantizing unit 12. The reverse quantizing unit 12 performs predetermined reverse quantizing, which then sends out the converted data 112 to the inter-frame computation unit 13. The inter-frame computation unit 13 performs predetermined inter-frame computation, which then sends out the converted data 113 to the quantizing unit 14. The quantizing unit 14 performs predetermined quantizing, which then sends out the re-quantized data 114 to the restructuring unit 15. The restructuring unit 15 performs restructuring to a predetermined code format, which then sends out the converted code data 130 to the converted code output unit 40. The converted code output unit 40 sends out the converted code data 130 outside.
The operation of the related art based on the above configuration will be described. FIG. 13 is a flowchart showing the operation of the image encoder of the related art. The operation of the related art will be described below using FIG. 13. In S10, the code input unit 10 inputs a code from outside. In S11, the block extraction unit 11 extracts a block. In S12, the reverse quantizing unit 12 performs reverse quantizing. In S13, the inter-frame computation unit 13 performs inter-frame computation. In S14, the quantizing unit 14 performs quantizing. In S15, the restructuring unit 15 restructures the code. In S40, the converted code output unit 40 outputs the converted code. In S50, when there is an unprocessed code, the routine is advanced to S10. Otherwise, the entire process is terminated.
In the above operation, the related art includes, as the inter-frame computation, frame rate conversion and bit rate conversion.
The problems of the related art will be described. The related art intends to make conversion of the codes faster by omitting frequency conversion and reverse conversion. However, since reverse quantizing is performed in S12, the inter-frame computation in S13 must process an enormous amount of data. As a result, the related art can-be faster than a converting process with frequency conversion while processing of the amount of uncompressed data cannot be improved. The increased amount of processed data results in longer processing time and a larger device.
As the abovementioned problems of the related art, since the amount of processed data is large, the processing time is longer and a device is larger.